err = False
n = -1
try:
    n = int(input())
except:
    err = True
if n<0 or err:
    print("illegal input")
else:
    List = []
    for i in range(n):
        List.append(int(input()))
    count = 0
    if n>0:
        average = sum(List)/len(List)
        for i in List:
            if i>=average:
                count += 1
    print(count)